package by.grsu.hdm.media;

import java.util.Map;
import java.util.TreeMap;

import by.grsu.hdm.media.remotecontrol.RemoteControl;

public class MediaPlayer {
	private String playerName;
	private Track track;
	private RemoteControl remoteControl;
	private Map<String,IFormatPlayer> formats = new TreeMap<String,IFormatPlayer>();

	public Map<String,IFormatPlayer> getFormats() {
		return formats;
	}

	public void registerFormat(IFormatPlayer format) {
		this.formats.put(format.getName(),format);
	}

	protected MediaPlayer() {
	}

	public MediaPlayer(String playerName, RemoteControl remoteControl) {
		this.playerName = playerName;
		this.remoteControl = remoteControl;

	}

	public String getPlayerName() {
		return playerName;
	}

	public RemoteControl getRemoteControl() {
		return remoteControl;
	}

	public Track getTrack() {
		return track;
	}

	public void setTrack(Track track) {
		this.track = track;
	}

}
